import request from '@/utils/request'

export function createPurchaseArrivalOrder(purchaseArrivalOrderVo) {
  return request({
    url: '/admin/leaves/purchase-arrival-order/createPurchaseArrivalOrder',
    method: 'post',
    data: purchaseArrivalOrderVo
  })
}

export function deletePurchaseArrivalOrder(id) {
  return request({
    url: `/admin/leaves/purchase-arrival-order/deletePurchaseArrivalOrder/${id}`,
    method: 'delete'
  })
}

export function updatePurchaseArrivalOrder(purchaseArrivalOrderVo) {
  return request({
    url: '/admin/leaves/purchase-arrival-order/updatePurchaseArrivalOrder',
    method: 'put',
    data: purchaseArrivalOrderVo
  })
}

export function getPurchaseArrivalOrderList(searchObj) {
  return request({
    url: '/admin/leaves/purchase-arrival-order/getPurchaseArrivalOrderList',
    method: 'post',
    data: searchObj
  })
}

export function confirmOrder(id) {
  return request({
    url: `/admin/leaves/purchase-arrival-order/confirmOrder/${id}`,
    method: 'post'
  })
}

